import request from '@/utils/request'

// 查询虚拟机模板列表
export function listMachine(query) {
  return request({
    url: '/experiment/machine/list',
    method: 'get',
    params: query
  })
}

// 查询虚拟机模板详细
export function getMachine(virtualMachineId) {
  return request({
    url: '/experiment/machine/' + virtualMachineId,
    method: 'get'
  })
}

// 新增虚拟机模板
export function addMachine(data) {
  return request({
    url: '/experiment/machine',
    method: 'post',
    data: data
  })
}

// 修改虚拟机模板
export function updateMachine(data) {
  return request({
    url: '/experiment/machine',
    method: 'put',
    data: data
  })
}

// 删除虚拟机模板
export function delMachine(virtualMachineId) {
  return request({
    url: '/experiment/machine/' + virtualMachineId,
    method: 'delete'
  })
}
